home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Superior F198925222001.psc / modJoinFile.bas < prev   
Encoding:
BASIC Source File  |  2001-05-20  |  1.1 KB  |  39 lines

  1. Attribute VB_Name = "modJoin"
  2. Option Explicit
  3.  
  4. Private Huffman As clsHuffman
  5.  
  6. 'Declare the variable Bytes as of ChunkSize type
  7. Dim Bytes As ChunkSize
  8.  
  9. Function JoinFile(FileName As String, Extension As String, Compress As Integer, NumOfSegments As Integer, DestinationPath As String) As Integer
  10. ' Filename      = The original file
  11. ' Extension     = Original Extension
  12. ' Compress      = Compressed state
  13. ' NumOfSegments = Number of files to join
  14.  
  15.  
  16.  
  17.   On Error GoTo ErrorHandler
  18.  
  19.     
  20.   'Make sure the settings are correct
  21.   Dim ErrorCode As Integer
  22.   If NumOfSegments > 999 Then                               ' Ensure that the segment size is valid
  23.     ErrorCode = 2
  24.     GoTo ErrorHandler
  25.   End If
  26.  
  27.   Dim SourceBytes         As Long
  28.   Dim SourceFile          As String
  29.   Dim DestinationFile     As String
  30.   Dim SegmentNumber       As Integer
  31.   Dim BytesDone           As Long
  32.   Dim FPath               As String
  33.   Dim FName               As String
  34.   Dim FNameNoExt          As String
  35.   Dim Remainingc FNamSid
  36.     ErrorCode = 2
  37.     GoTo ErrorHandler
  38.   Eecls SPrrorH)
  39.   Dup.